//
//  HeadView.m
//  NewMusic
//
//  Created by dllo on 15/11/21.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "HeadView.h"

@implementation HeadView

/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatSubView];
    }
    return self;
}
- (void)creatSubView
{
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 375, 70)];
    view.backgroundColor = [UIColor whiteColor];
    view.alpha = 0.03;
    [self addSubview:view];
    [view release];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(50, 30, 150, 30)];
    label.text = @"偏好设置";
    label.textColor = [UIColor colorWithRed:230 / 255.0 green:230 / 255.0 blue:230 / 255.0 alpha:1.0];
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont boldSystemFontOfSize:20.0];
    [self addSubview:label];
    [label release];
    UIView *viewLine = [[UIView alloc] initWithFrame:CGRectMake(0, 69, 375, 1)];
    viewLine.backgroundColor = [UIColor colorWithRed:24 / 255.0 green:38 / 255.0 blue:51 / 255.0 alpha:1.0];
    [self addSubview:viewLine];
    [viewLine release];
}
@end
